<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	$(function() {
		$('#roleAddForm').form({
			url : '${pageContext.request.contextPath}/ebook/fileUpload2',
			onSubmit : function() {
				var isValid = $(this).form('validate');
				if (!isValid) {
					//progressClose();
				}
				return isValid;
			},
			success : function(result) {
				//progressClose();
				result = $.parseJSON(result);
				if (result.success) {
					//parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
					parent.$.modalDialog.handler.dialog('close');
				} else {
					parent.$.messager.alert('错误', result.msg, 'error');
				}
			}
		});
	});
</script>
<div style="margin: 5px">
	<form id="roleAddForm" action="/lightmvc/ebook/fileUpload2" method="post" enctype="multipart/form-data">
		<table cellspacing="0" cellpadding="3" border="1">
			<tbody>
				<tr bgcolor="#398EB7">
					<td colspan="2"><font color="#ffffff">档案上传表格</font></td>
				</tr>
				<tr>
					<td>文件类别</td>
					<td><select name="example" size="1" onchange="redirect(this.options.selectedIndex)" class="user2">
							<option value="project_data">专案资料</option>
							<option value="product_data">产品资料</option>
							<option value="technique_share">技术评估/分享</option>
					</select> <font face="Verdana">- <select name="stage1" size="1" class="user2">
								<option value="requirement">需求书</option>
								<option value="specification">设计规格书</option>
								<option value="system_manual">系统手册</option>
								<option value="test_report">测试报告</option>
						</select> </font></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>专案代码(归档用)</td>
					<td><input type="TEXT" size="30" value="" maxlength="15" name="code"></td>
				</tr>
				<tr>
					<td width="150">
						<div align="left">
							<p>
								文件标题 <font face="Verdana"> :&nbsp; </font>
							</p>
						</div></td>
					<td width="324"><font face="Verdana"> <input type="TEXT" size="30" maxlength="50" value="" name="fileName"> <br> </font></td>
				</tr>
				<tr>
					<td>
						<div align="left">
							<p>
								<font face="Verdana">新增原因 :&nbsp;</font> <br>
							</p>
						</div></td>
					<td><font face="Verdana"> <input type="TEXT" size="30" maxlength="50" value="" name="doc_desc"> <br> </font></td>
				</tr>
				<tr>
					<td>
						<div align="left">
							<p>
								<font face="Verdana">档案:&nbsp;</font> <br>
							</p>
						</div></td>
					<td><font face="Verdana"> <input type="file" name="fileUpload" class="easyui-validatebox" data-options="required:true"/> <br> </font></td>
				</tr>
				<tr>
					<td width="474" colspan="2">
						<div align="center">
							<input type="hidden" name="department" value="development"> 
							<input type="hidden" name="department_code" value="4"> <font face="Verdana"> 
							<br> <!-- <input type="button" onclick="fileup()" value="上传" class="find_ok" name="upload"> --> 
							<input type="submit" value="上传" class="find_ok" /> 
							<input type="reset" value="清除" class="find_ok" name="reset"> </font>
						</div></td>
				</tr>
				<div>
					<input type="hidden" value="" name="file_name">
					 <input type="hidden" value="" name="file_title" /> 
					<input type="hidden" value="" name="file_desc" />
				</div>
			</tbody>
		</table>
	</form>
</div>